#!/bin/bash

set -e

case "$1" in
    remove|purge)
        if command -v update-grub > /dev/null && [ -d /boot/grub ]; then
            update-grub || :
        fi
    ;;

    disappear|upgrade|failed-upgrade|abort-install|abort-install|abort-upgrade)
    ;;

    *)
	echo "postrm called with unknown argument \`$1'" >&2
	exit 1
    ;;
esac

sed -i.bak "\@^none /proc/xen xenfs defaults,nofail 0 0@d" /etc/fstab

exit 0
